import request from '@/utils/request';
import qs from 'qs';
import type { PageResult, ResponseData } from '../typing';
// 参数接口
export interface CreateMedicalCaregiverHospitalParams {
    /*项目code */
    projectCode: string;
    /*项目名 */
    projectName: string;
    /*logo */
    logo?: string;
    /*banner图地址 */
    banner?: string;
    /*状态:0->禁用,1->启用 */
    status?: number;
}
/**
 * 创建医院
 * @param {object} params 管理后台 - 医院创建 Request VO
 * @param {string} params.projectCode 项目code
 * @param {string} params.projectName 项目名
 * @param {string} params.logo logo
 * @param {string} params.banner banner图地址
 * @param {number} params.status 状态:0->禁用,1->启用
 * @returns
 */
export function createMedicalCaregiverHospital(params: CreateMedicalCaregiverHospitalParams): Promise<ResponseData<any>> {
    return request.post(`/yfwy/medical-caregiver-hospital`, params);
}
// 参数接口
export interface UpdateMedicalCaregiverHospitalParams {
    /*主键 */
    id: number;
}
/**
 * 更新医院
 * @param {object} params 管理后台 - 医院更新 Request VO
 * @param {number} params.id 主键
 * @returns
 */
export function updateMedicalCaregiverHospital(params: UpdateMedicalCaregiverHospitalParams): Promise<ResponseData<any>> {
    return request.put(`/yfwy/medical-caregiver-hospital`, params);
}
// 响应接口
export interface GetMedicalCaregiverHospitalRes {
    /* */
    code: number;
    /* */
    data: {
        /* */
        createTime: Record<string, unknown>;
        /* */
        updateTime: Record<string, unknown>;
        /* */
        creator: number;
        /* */
        updater: number;
        /*主键 */
        id: number;
        /*项目code */
        projectCode: string;
        /*项目名 */
        projectName: string;
        /*logo */
        logo: string;
        /*banner图地址 */
        banner: string;
        /*状态:0->禁用,1->启用 */
        status: number;
        /*省份ID */
        provinceId: string;
        /*省份 */
        province: string;
        /*城市ID */
        cityId: string;
        /*城市 */
        city: string;
        /*区县ID */
        regionId: string;
        /*区县 */
        region: string;
        /*详细地址 */
        detailAddress: string;
    };
    /* */
    msg: string;
}
/**
 * 获得医院
 * @param {string} id
 * @returns
 */
export function getMedicalCaregiverHospital(id: number): Promise<GetMedicalCaregiverHospitalRes> {
    return request.get(`/yfwy/medical-caregiver-hospital/${id}`);
}
/**
 * 删除医院
 * @param {string} id
 * @returns
 */
export function deleteMedicalCaregiverHospital(id: number): Promise<ResponseData<any>> {
    return request.delete(`/yfwy/medical-caregiver-hospital/${id}`);
}
// 响应接口
export interface GetMedicalCaregiverHospitalPageRes {
    /* */
    code: number;
    /* */
    data: {
        /* */
        size: number;
        /* */
        total: number;
        /* */
        current: number;
        /* */
        records: {
            /* */
            createTime: Record<string, unknown>;
            /* */
            updateTime: Record<string, unknown>;
            /* */
            creator: number;
            /* */
            updater: number;
            /*主键 */
            id: number;
            /*项目code */
            projectCode: string;
            /*项目名 */
            projectName: string;
            /*logo */
            logo: string;
            /*banner图地址 */
            banner: string;
            /*状态:0->禁用,1->启用 */
            status: number;
            /*省份ID */
            provinceId: string;
            /*省份 */
            province: string;
            /*城市ID */
            cityId: string;
            /*城市 */
            city: string;
            /*区县ID */
            regionId: string;
            /*区县 */
            region: string;
            /*详细地址 */
            detailAddress: string;
        }[];
        /* */
        pages: number;
    };
    /* */
    msg: string;
}
export interface queryParams {
    projectName?: string;
    current: string;
    ize: string;
}
/**
 * 获得医院分页
 * @param {string} projectName 医院名称
 * @param {string} current 当前第几页(默认1)
 * @param {string} size 每页条数(默认20)
 * @returns
 */
export function getMedicalCaregiverHospitalPage(params: queryParams): Promise<GetMedicalCaregiverHospitalPageRes> {
    return request.get(`/yfwy/medical-caregiver-hospital/page?current=${params.current}&size=${params.size}${params.projectName ? '&projectName=' + params.projectName : ''}`);
}
